package com.design.pattern.create.factory.factoryMethod;

import com.design.pattern.entry.Fruit;

/**
 * 工厂方法测试类
 *
 * @author gyf
 * @create 2018-11-30 16:18
 **/
public class FactoryTest {
    public static void main(String [] args){
        //spring 根据配置文件注册工厂类，然后生成到IOC容器里面
        FruitFactory fruitFactory=new AppleFacroty();
        Fruit fruit = fruitFactory.getFruit();
        fruit.draw();
    }
}
